<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
      table{
        border: solid;
        border-color: #666666;
      }
      table th{
        border: solid;
        border-color: #666666;
      }
      table td{
        border: solid;
        border-color: #666666;
      }
    </style>
</head>
<body>
      <input type="text" id="username" value="张三">
      <input type="text" id="salary" value="7000">
      <input type="text" id="job" value="程序员">
      <input type="button" value="点我添加员工" onclick="addEmp()">
  <hr>
      <table id="employee">
        <tr>
          <th>姓名</th>
          <th>工资</th>
          <th>岗位</th>
        </tr>
      </table>

      <script>
        function addEmp(){
          let username = document.getElementById("username").value;
          let salary = document.getElementById("salary").value;
          let job = document.getElementById("job").value;
          let table = document.getElementById("employee");
          let row = table.insertRow();
          let tdname = row.insertCell();
          let tdsalary = row.insertCell();
          let tdjob = row.insertCell();
          tdname.innerHTML=username;
          tdsalary.innerHTML=salary
          tdjob.innerHTML=job;
        }
      </script>
</body>
</html>